<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // c=5 默认值 优先级很低 只有对应的数组项严格等于undefined时 才会生效
        let [a,b,c=5] = [1,2, null];
        console.log(a,b,c);

        // 惰性求值 性能好
        let [a1,b1,c1=fn1()] = [1,2, undefined];
        function fn1() {
            console.log('========fn1');
            return 666
        }
        console.log(a1,b1,c1);

        // ... 新的运算符 展开运算符 剩余运算符
        let [a0, b0, c0, ...d0] = [1,2,3,4,5,6,7];
        console.log(a0, b0, c0);
        console.log(d0);
    </script>
</body>
</html>